home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / PowerMacOberon feb96 / Text / Directories.Text (.txt) < prev    next >
Encoding:
Oberon Text  |  1995-10-31  |  6.9 KB  |  95 lines  |  [TEXT/.Ob4]

  1. Syntax10.Scn.Fnt
  2. ParcElems
  3. Alloc
  4. Syntax20.Scn.Fnt
  5. Syntax12.Scn.Fnt
  6. Syntax12b.Scn.Fnt
  7. StyleElems
  8. Alloc
  9. FirstIndent2
  10. Syntax12i.Scn.Fnt
  11. TableElems
  12. Alloc
  13. Syntax10.Scn.Fnt
  14. /columns LLL /table
  15.     Windows    Macintosh
  16. full    c:\Oberon\User\Configuration.Mod    Romeo:Oberon:User:Configuration.Mod
  17. filename only    Configuration.Mod    Configuration.Mod
  18. startup directory    c:\Oberon\User    Romeo:Oberon
  19. current directory    c:\Oberon\User    Romeo:Oberon:User
  20. parent of current    ..    ::
  21. relative to current    .\Configuration.Mod    :Configuration.Mod
  22. relative to parent    ..\User\Configuration.Mod    ::User:Configuration.Mod
  23. relative to startup    $Configuration.Mod    $User:Configuration.Mod
  24. FirstIndent1
  25. FirstIndent2
  26. FirstIndent1
  27. FirstIndent1
  28. Text2
  29. FirstIndent1
  30. Text2
  31. FirstIndent1
  32. Text2
  33. FirstIndent1
  34. A Guide to Oberon with Paths and Directories
  35. C. Steindl, Oktober 27 1995
  36. Introduction
  37. Oberon usually supports only a flat directory where all files (*.Mod, *.Obj, *.Tool, *.Text, *.Bak, *.Sym) reside. But you can also arrange your data in directories or in folders. 
  38. With this version of Oberon it is possible to:
  39. 1) Define paths (directories, folders) in which files are automatically sought, when they shall be opened.
  40. 2) Change the current working directory.
  41. In the following we will use the term path, directory or folder synonymously. Each denoting a place on a hard disk where files can be stored. The current working directory is the directory where all files are stored.
  42. Specification of files and directories
  43. You can specify files and directories with pathnames. 
  44. A full pathname is a sequence of directory names, separated by a special delimiter character (as defined in Directories.delimiter), starting from the root directory (or volume) and leading down to the file.
  45. A relative pathname is relative to the current working directory or to the startup directory. The startup directory is the current working directory after startup.
  46. Examples:
  47. Startup process under Oberon for Windows
  48. Under Windows, Oberon is started by clicking on an icon. Associated with this icon is the information where the application is located and which directory shall be the working directory. When loaded, Oberon looks for a file called "Oberon.Ini" in the startup directory. This initialization file contains some initial settings including a path variable which denotes a sequence of paths that shall be sought when looking for a file (similar to the DOS environment variable PATH). The initial current working directory (also called the startup directory) is the directory associated with the Oberon-icon as the working directory.
  49. Startup process under Oberon for PowerMac
  50. On a  PowerMac, Oberon is started by clicking on the application. If there is a file called "Paths.Text" in the same directory as the application, then the sequence of paths in the the file "Paths.Text" will be sought when looking for a file.
  51. Opening files
  52. Unless you specify a pathname, files are sought
  53.     1) in the current working directory
  54.     2) in the defined search paths
  55.     3) in the startup directory
  56. Storing files
  57. Unless you specify a pathname, new files (including new versions of existing files) are stored in the current working directory.
  58. Commands in module System
  59. Directory (^ | pattern["/"{"d" | "a" | "s" | "n" | "D" | "A" | "S" | "N"}]) lists the directory entries that match the specified pattern. 
  60. The following options are possible: 
  61.     "d" or "D" for date
  62.     "s" or "S" for size
  63.     "a" or "A" for looking in all paths
  64.     "n" or "N" for DOS name (only under Windows)
  65. ChangeDir (^ | name) changes the current working directory to the specified directory.
  66. CreateDir (^ | name) creates the specified directory.
  67. DeleteDir (^ | name) deletes the specified directory.
  68. ParentDir changes the current working directory to the parent directory of the current working directory.
  69. ShowDir displays the current working directory in the log viewer.
  70. StartupDir changes the current working directory to the startup directory.
  71. Module Directories
  72. Exported procedures
  73. Current () returns a directory structure denoting the current working directory.
  74. Startup () returns a directory structure denoting the startup directory.
  75. This (path) returns a directory structure denoting the specified directory.
  76. Change (path) changes the current working directory to the specified directory.
  77. Create (path) creates the specified directory.
  78. Delete (path) deletes the specified directory.
  79. Rename (oldPath, newPath) renames the directory oldPath to newPath.
  80. Enumerate (dir, fileProc) calls fileProc for each entry in the specified directory.
  81. The type FileProc is defined as PROCEDURE (d: Directory; name: ARRAY OF CHAR; isDir: BOOLEAN; VAR continue: BOOLEAN).
  82. isDir is TRUE if the directory entry specified by name is itself a directory.
  83. If the called procedure sets the parameter continue to FALSE, the enumeration process is ended immediately.
  84. EnumeratePaths (pathProc) calls pathProc for each search path.
  85. The type PathProc is defined as PROCEDURE (path: ARRAY OF CHAR; VAR continue: BOOLEAN);
  86. If the called procedure sets the parameter continue to FALSE, the enumeration process is ended immediately.
  87. Exported variables:
  88. res indicates the result of the last directory operation and can be any of the exported values (noErr, badName, mediumFull, mediumLocked, dirInUse, notADir, alreadyExists, and otherError)
  89. notify is a procedure variable which is called whenever a directory entry is inserted or deleted.
  90. The type Notifier is defined as PROCEDURE (op: INTEGER; path, name: ARRAY OF CHAR);
  91. op can be one of the exported values (insert or delete).
  92. path and name specify the inserted/deleted directory entry.
  93. Exported constants:
  94. delimiter is the special character that delimits directory names within a path (e.g. "\" under Windows and ":" under PowerMac).
  95.